// 查询所有商家
const getStoreList = (params) => {
    return $axios({
        url: '/categoryDetail',
        method: 'get',
        params
    })
}

//根据商家查询商家信息
const getStoreInfoByCategoryId = (categoryId) => {
    return $axios({
        url: `/categoryDetail/${categoryId}`,
        method: 'get'
    })
}

//根据商家查询用户评论商家信息
const getUserCommentByCategoryId = (categoryId) => {
    return $axios({
        url: `/categoryComment/${categoryId}`,
        method: 'get'
    })
}
//根据商家和用户id查询评论信息
const getUserByCategoryByParams = (params) => {
    return $axios({
        url: '/categoryComment',
        method: 'get',
        params
    })
}


//新增评论 ...可变参数
const addComment = (params) => {
    return $axios({
        url: '/categoryComment',
        method: 'post',
        data: {...params}
    })
}

//根据评论ID进行删除
const delComment = (id) => {
    return $axios({
        url: `/categoryComment`,
        method: 'delete',
        params: {id}
    })
}

